import {lazy} from 'react'
import {Navigate } from 'react-router-dom'
const Datasource = lazy(() => import('../pages/Datasource'))
const Vector = lazy(() => import('../pages/Datasource/Vector'))
const Grid = lazy(() => import('../pages/Datasource/Grid'))
const Three = lazy(() => import('../pages/Datasource/Three'))
const Tile = lazy(() => import('../pages/Datasource/Tile'))

const routes = [
  {
    path:'/',
    element: <Navigate to='/datasource'/>
  },
  {
    path:'/datasource',
    element: <Datasource/>,
    children:[
      {
        path:'vector',
        element: <Vector/>
      },
      {
        path:'grid',
        element: <Grid/>
      },
      {
        path:'three',
        element: <Three/>
      },
      {
        path:'tile',
        element: <Tile/>
      }
    ]
  }
]
export default routes